package com.lagou.sqlSession;

import com.lagou.pojo.MappedStatement;

import java.util.List;

public interface SqlSession {

    // 查询所有
    public <E> List<E> selectList(String statementId, Object... params) throws Exception;

    // 通过用户ID和userName进行查询
    public  <T> T selectOne(String statementId, Object... params) throws Exception;

    // 通过用户ID以修改用户名称
    public boolean updateById(MappedStatement mappedStatement, Object... params) throws Exception;

    // 通过用户ID删除用户
    public boolean deleteById(MappedStatement mappedStatement, Object... params) throws Exception;

    // 传入用户ID和用户名称新增用户
    public boolean insert(MappedStatement mappedStatement, Object... params) throws Exception;

    // 通过代理的方式来动态执行sql
    public <T> T getMapper(Class<?> mapperClass);

}
